package com.hotel.tv.web.user.configure;

import com.hotel.tv.runtime.session.HotelUserSession;
import com.hotel.tv.runtime.session.impl.HotelUserSessionImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

/**
 * 用户端Web配置
 * <p>
 * </p>
 *
 * @description TODO
 * @author: 老码农
 * @create: 2020-04-02 21:48
 **/
@Configuration
public class UserWebConfiguration {

    /**
     * 会话替换，否则框架会采用空会话 ，一定要加 @Primary
     * @return
     */
    @Bean
    @Primary
    public HotelUserSession hotelUserSession(){
        return new HotelUserSessionImpl();
    }
}
